﻿using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace IotClientApp.Server.Entity
{
    public class Device
    {
        [Key]
        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public string Id { get; set; }
        [MaxLength(100)]
        [Comment("名称")]
        [Required]
        public string Name { get; set; }
        [MaxLength(500)]
        public string? Desc { get; set; }
        public bool IsActive { get; set; }
        /// <summary>
        /// 推送mqtt地址
        /// </summary>
        public string? MqttServer { get; set; }
        public DateTime CreateTime { get; set; }
    }
}